/**
 * Created by Administrator on 2015/12/30.
 */
var basedataCtr = require('./controller/basedata');
var configManage=require('./controller/configManage');
var express = require('express');
var router = express.Router();

/* GET home page. */
router.get('/', function(req, res, next) {
    res.render('index');
});
router.get('/basedata/userManage', function(req, res, next) {
    res.render('basedata/userManage');
});
router.get('/basedata/authManage', function(req, res, next) {
    res.render('basedata/authManage');
});
router.get('/basedata/operateManage', function(req, res, next) {
    res.render('basedata/operateManage');
});
router.get('/basedata/menuManage', function(req, res, next) {
    res.render('basedata/menuManage');
});
router.get('/basedata/configManage', configManage.index);
router.get('/basedata/configManage/:pageIndex', configManage.index);
router.get('/basedata/cityManage', function(req, res, next) {
    res.render('basedata/cityManage');
});

router.get('/basedata/addUser', function(req, res, next) {
    res.render('basedata/addUser');
});
router.get('/basedata/addAuthGroup', function(req, res, next) {
    res.render('basedata/addAuthGroup');
});
router.get('/basedata/addMenu', function(req, res, next) {
    res.render('basedata/addMenu');
});
router.get('/addProvice', function(req, res, next) {
    res.render('basedata/addProvice');
});
router.get('/addCity', function(req, res, next) {
    res.render('basedata/addCity');
});
router.get('/basedata/addConfig', function(req, res, next) {
    res.render('basedata/addConfig');
});
router.get('/error', function(req, res, next) {
    res.render('error');
});

router.get('/add_or_edit_city', basedataCtr.add_or_edit_city);

router.get('/add_or_edit_province', basedataCtr.add_or_edit_province);

router.get('/add_or_edit_user', basedataCtr.add_or_edit_user);
router.get('/add_or_edit_config', basedataCtr.add_or_edit_config);

module.exports = router;
